package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BBiddingQyMapper;
import com.ruoyi.system.domain.BBiddingQy;
import com.ruoyi.system.service.IBBiddingQyService;
import com.ruoyi.common.core.text.Convert;

/**
 * 投标保函-企业信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-10-16
 */
@Service
public class BBiddingQyServiceImpl implements IBBiddingQyService 
{
    @Autowired
    private BBiddingQyMapper bBiddingQyMapper;

    /**
     * 查询投标保函-企业信息
     * 
     * @param id 投标保函-企业信息主键
     * @return 投标保函-企业信息
     */
    @Override
    public BBiddingQy selectBBiddingQyById(Long id)
    {
        return bBiddingQyMapper.selectBBiddingQyById(id);
    }

    /**
     * 查询投标保函-企业信息列表
     * 
     * @param bBiddingQy 投标保函-企业信息
     * @return 投标保函-企业信息
     */
    @Override
    public List<BBiddingQy> selectBBiddingQyList(BBiddingQy bBiddingQy)
    {
        return bBiddingQyMapper.selectBBiddingQyList(bBiddingQy);
    }

    /**
     * 新增投标保函-企业信息
     * 
     * @param bBiddingQy 投标保函-企业信息
     * @return 结果
     */
    @Override
    public int insertBBiddingQy(BBiddingQy bBiddingQy)
    {
        bBiddingQy.setCreateTime(DateUtils.getNowDate());
        return bBiddingQyMapper.insertBBiddingQy(bBiddingQy);
    }

    /**
     * 修改投标保函-企业信息
     * 
     * @param bBiddingQy 投标保函-企业信息
     * @return 结果
     */
    @Override
    public int updateBBiddingQy(BBiddingQy bBiddingQy)
    {
        bBiddingQy.setUpdateTime(DateUtils.getNowDate());
        return bBiddingQyMapper.updateBBiddingQy(bBiddingQy);
    }

    /**
     * 批量删除投标保函-企业信息
     * 
     * @param ids 需要删除的投标保函-企业信息主键
     * @return 结果
     */
    @Override
    public int deleteBBiddingQyByIds(String ids)
    {
        return bBiddingQyMapper.deleteBBiddingQyByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除投标保函-企业信息信息
     * 
     * @param id 投标保函-企业信息主键
     * @return 结果
     */
    @Override
    public int deleteBBiddingQyById(Long id)
    {
        return bBiddingQyMapper.deleteBBiddingQyById(id);
    }
}
